<?php
include_once $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR . 'datacache/command.php';
include_once $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR . 'datacache/public.php';
$Shortcut = "[InternetShortcut]
URL=".$CONFIG['domain']."
IDList=
IconFile=".$CONFIG['domain']."favicon.ico
IconIndex=1
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
";

$ua = $_SERVER["HTTP_USER_AGENT"];
$filename = softtitle.".url";
$encoded_filename = urlencode($filename);
$encoded_filename = str_replace("+", "%20", $encoded_filename);
header("Content-Type: application/octet-stream");
//根据不同的浏览器处理utf8编码
if (preg_match("/MSIE/", $ua)) {
	header("Content-Disposition: attachment; filename=".$encoded_filename);
} else if (preg_match("/Firefox/", $ua)) { 
	header("Content-Disposition: attachment; filename*=".$filename);
} else { 
	header("Content-Disposition: attachment; filename=".$filename);
}
echo $Shortcut; 
?>
